package com.iot.product.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 设备表
 * </p>
 *
 * @author 孟繁森
 * @since 2021-03-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("iot_device")
@ApiModel(value="Device对象", description="设备表")
public class Device implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "客户id")
    private String clientId;

    @ApiModelProperty(value = "阿里云账号id")
    private String aliAccountId;

    @ApiModelProperty(value = "产品id")
    private String productId;

    @ApiModelProperty(value = "ProductKey")
    private String productKey;

    @ApiModelProperty(value = "ProductSecret")
    private String productSecret;

    @ApiModelProperty(value = "自己的ProductKey")
    private String myProductKey;

    @ApiModelProperty(value = "自己的ProductSecret")
    private String myProductSecret;

    @ApiModelProperty(value = "DeviceName")
    private String deviceName;

    @ApiModelProperty(value = "DeviceSecret")
    private String deviceSecret;

    @ApiModelProperty(value = "自己的DeviceName")
    private String myDeviceName;

    @ApiModelProperty(value = "自己的DeviceSecret")
    private String myDeviceSecret;

    @ApiModelProperty(value = "节点类型 0:设备,1:网关")
    private Integer nodeType;

    @ApiModelProperty(value = "数据格式 0:Alink协议,1:透传/自定义")
    private Integer dataFormat;

    @ApiModelProperty(value = "校验级别 0:弱校验,1:免校验")
    private Integer validateType;

    @ApiModelProperty(value = "认证方式 0:密钥校验")
    private Boolean authType;

    @ApiModelProperty(value = "IP地址")
    private String ipAddress;

    @ApiModelProperty(value = "是否是网桥设备 0:不是 1:是")
    private Integer serverType;

    @ApiModelProperty(value = "当前状态 0:未激活,1:离线,2:在线")
    private Integer useStatus;

    @ApiModelProperty(value = "最后上线时间")
    private Date lastOnlineTime;

    @ApiModelProperty(value = "是否删除 0:未删除,1:已删除")
    @TableLogic
    private Integer deleteStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "修改者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    @ApiModelProperty(value = "设备备注名")
    private String deviceNickname;


}
